import request from '@/utils/request'
export function selectByCityCode(data) {
  return request({
    method: 'post',
    url: '/api/healthy/selectByCityCode',
    data
  })
}
export function selectIncome(data) {
  return request({
    method: 'post',
    url: '/api/incomeQuestion/selectIncome',
    data
  })
}
export function selectMgr(data) {
  return request({
    method: 'post',
    url: '/api/incomeQuestion/selectMgr',
    data
  })
}
export function selectQuestion(data) {
  return request({
    method: 'post',
    url: '/api/incomeQuestion/selectQuestion',
    data
  })
}
export function selectThree(data) {
  return request({
    method: 'post',
    url: '/api/threeHundred/selectThree',
    data
  })
}
export function getDataInfo(data) {
  return request({
    method: 'post',
    url: '/api/head/data',
    data
  })
}
export function getDoubleFive(data) {
  return request({
    method: 'get',
    url: '/doubleFive/selectAll',
    params: data
  })
}
export function getShangji(data) {
  return request({
    method: 'post',
    url: '/shangJi',
    data
  })
}
export function getCollection(data) {
  return request({
    method: 'get',
    url: '/api/incomeQuestion/selectCollection',
    params: data
  })
}
export function getIncomeQuestion(data) {
  return request({
    method: 'post',
    url: `/api/incomeQuestion/${data.type || ''}`,
    data: data.param || {}
  })
}
export function getThreeHundred(data) {
  return request({
    method: 'post',
    url: `/api/threeHundred/selectThreeHundredAll`,
    data
  })
}
// 新增目标
export function addTask(data) {
  return request({
    method: 'post',
    url: '/api/tasks',
    data
  })
}
// 创建子任务
export function addSubtasks(data, mainId) {
  return request({
    method: 'post',
    url: `/api/tasks/${mainId}/subtasks`,
    data
  })
}
// 查询我的任务
export function myTasks(data, username) {
  return request({
    method: 'post',
    url: `/api/tasks/allExecutor`,
    data
  })
}
// 更新任务
export function updateTask(data, mainId) {
  return request({
    method: 'put',
    url: `/api/tasks/${mainId}`,
    data
  })
}
// 更新子任务
export function updateSubtask(data, subId) {
  return request({
    method: 'put',
    url: `/api/tasks/subtasks/${subId}`,
    data
  })
}
// 完成任务
export function completeTask(mainId) {
  return request({
    method: 'post',
    url: `/api/tasks/${mainId}/complete`
  })
}
// 终止任务
export function deleteTask(mainId) {
  return request({
    method: 'post',
    url: `/api/tasks/${mainId}/terminate`,
  })
}
// 删除子任务
export function deleteSubtask(subId) {
  return request({
    method: 'delete',
    url: `/api/tasks/subtasks/${subId}`,
  })
}
// 目标管理列表
export function getTaskList(data) {
  return request({
    method: 'post',
    url: `/api/tasks/selectTasks`,
    data
  })
}
// 获取前50条用户
export function getPersonList(data) {
  return request({
    method: 'post',
    url: `/accountInfo/selectAll`,
    data
  })
}
// 获取目标详情
export function getDetail(mainId) {
  return request({
    method: 'get',
    url: `/api/tasks/${mainId}`,
  })
}
// 新增工作任务
export function getBatch(data, subId, currentUser) {
  return request({
    method: 'post',
    url: `/api/tasks/subtasks/${subId}/batch?currentUser=${currentUser}`,
    data
  })
}
// 修改全量工作任务
export function getBatchAll(data, subId) {
  return request({
    method: 'post',
    url: `/api/tasks/subtasks/${subId}/batchAll`,
    data
  })
}
// 查询工作任务
export function getSubtasks(subId) {
  return request({
    method: 'get',
    url: `/api/tasks/subtasks/batch/${subId}`,
  })
}
// 执行人归属
export function getOrg(data) {
  return request({
    method: 'post',
    url: `/accountInfo/selectCityName`,
    data
  })
}
// OKR清单
export function getOkrList(data) {
  return request({
    method: 'post',
    url: `/api/tasks/all`,
    data
  })
}
// 查询全部部门子目标列表
export function getChildrenMb(data) {
  return request({
    method: 'get',
    url: `/api/tasks/taskType/subtasks`,
    params: data
  })
}
// 查询商机预警
export function getCloudNetwork(data) {
  return request({
    method: 'get',
    url: `/api/cloudNetwork/selectByCityCode`,
    params: data
  })
}
// 查询政务外网客户清单
export function selectByCityCodeAndCustomerType(data) {
  return request({
    method: 'get',
    url: `/api/cloudNetwork/selectByCityCodeAndCustomerType`,
    params: data
  })
}
// 查询大庆油田
export function selectByCustomerName(data) {
  return request({
    method: 'get',
    url: `/api/featureCustomer/selectByCustomerName`,
    params: data
  })
}
// 查询商机
export function selectByCityCodeAndProviderType(data) {
  return request({
    method: 'get',
    url: `/api/cloudNetwork/selectByCityCodeAndProviderType`,
    params: data
  })
}
export function addAssignedTask(data) {
  return request({
    method: 'post',
    url: `/api/assignedTask/addAssignedTask`,
    data
  })
}
export function updateAssignedTask(data) {
  return request({
    method: 'put',
    url: `/api/assignedTask/updateAssignedTask`,
    data
  })
}
export function deleteAssignedTask(id) {
  return request({
    method: 'delete',
    url: `/api/assignedTask/deleteAssignedTask/${id}`,
  })
}
export function getAssignedTaskList(data) {
  return request({
    method: 'get',
    url: `/api/assignedTask/selectAssignedTask`,
    params: data
  })
}
export function selectCustomerList(data) {
  return request({
    method: 'get',
    url: `/api/cloudNetwork/selectCustomerList`,
    params: data
  })
}
export function selectCloudCustomerType(data) {
  return request({
    method: 'get',
    url: `/api/cloudNetwork/selectCloudCustomerType`,
    params: data
  })
}
export function selectCloudComplete(data) {
  return request({
    method: 'get',
    url: `/api/cloudNetwork/selectCloudComplete`,
    params: data
  })
}
export function selectCloudWarning(data) {
  return request({
    method: 'get',
    url: `/api/cloudNetwork/selectCloudWarning`,
    params: data
  })
}
export function searchOkrNum(data) {
  return request({
    method: 'post',
    url: `/api/tasks/overview`,
    data
  })
}
// 新增客户清单
export function addNetworkCustomer(data) {
  return request({
    method: 'post',
    url: `/api/cloudNetwork/addNetworkCustomer`,
    data
  })
}
// 删除客户清单
export function deleteNetworkCustomer(id) {
  return request({
    method: 'delete',
    url: `/api/cloudNetwork/deleteNetworkCustomer/${id}`,
  })
}
// 修改客户清单
export function updateNetworkCustomer(data) {
  return request({
    method: 'put',
    url: `/api/cloudNetwork/updateNetworkCustomer`,
    data
  })
}
// 查询客户清单总数
export function customerTypeCount(data) {
  return request({
    method: 'get',
    url: `/api/cloudNetwork/customerTypeCount`,
    params: data
  })
}
// 获取客户清单区县
export function selectDistrictName(data) {
  return request({
    method: 'get',
    url: `/api/cloudNetwork/selectDistrictName`,
    params: data
  })
}

// 新增政务外网商机清单
export function addNetworkShangJi(data) {
  return request({
    method: 'post',
    url: `/api/cloudNetwork/addNetworkShangJi`,
    data
  })
}
// 删除政务外网商机清单
export function deleteNetworkShangJi(id) {
  return request({
    method: 'delete',
    url: `/api/cloudNetwork/deleteNetworkShangJi/${id}`,
  })
}
// 修改政务外网商机清单
export function updateNetworkShangJi(data) {
  return request({
    method: 'put',
    url: `/api/cloudNetwork/updateNetworkShangJi`,
    data
  })
}
// 查询政务外网商机清单
export function countShangJiByCityCode(data) {
  return request({
    method: 'get',
    url: `/api/cloudNetwork/countShangJiByCityCode`,
    params: data
  })
}
// 查询商机预警
export function countByFourLevelClassify(data) {
  return request({
    method: 'get',
    url: `/api/cloudNetwork/countByFourLevelClassify`,
    params: data
  })
}

// 新增政务云客户清单
export function addCloudCustomerType(data) {
  return request({
    method: 'post',
    url: `/api/cloudNetwork/addCloudCustomerType`,
    data
  })
}
// 删除政务云客户清单
export function deleteCloudCustomerType(id) {
  return request({
    method: 'delete',
    url: `/api/cloudNetwork/deleteCloudCustomerType/${id}`,
  })
}
// 修改政务云客户清单
export function updateCloudCustomerType(data) {
  return request({
    method: 'put',
    url: `/api/cloudNetwork/updateCloudCustomerType`,
    data
  })
}
// 查询政务云数量
export function countByCustomerType(data) {
  return request({
    method: 'get',
    url: `/api/cloudNetwork/countByCustomerType`,
    params: data
  })
}

// 新增政务云商机清单
export function addCloudComplete(data) {
  return request({
    method: 'post',
    url: `/api/cloudNetwork/addCloudComplete`,
    data
  })
}
// 删除政务云商机清单
export function deleteCloudComplete(id) {
  return request({
    method: 'delete',
    url: `/api/cloudNetwork/deleteCloudComplete/${id}`,
  })
}
// 修改政务云商机清单
export function updateCloudComplete(data) {
  return request({
    method: 'put',
    url: `/api/cloudNetwork/updateCloudComplete`,
    data
  })
}
// 商机清单完整率摸牌
export function countCloudCompleteByCityCode(data) {
  return request({
    method: 'get',
    url: `/api/cloudNetwork/countCloudCompleteByCityCode`,
    params: data
  })
}
// 政务云商机预警工作台展示
export function countCloudCompleteByContractEndTime(data) {
  return request({
    method: 'get',
    url: `/api/cloudNetwork/countCloudCompleteByContractEndTime`,
    params: data
  })
}

// 新增重点项目汇报
export function addProjectReport(data) {
  return request({
    method: 'post',
    url: `/api/projectReport/addProjectReport`,
    data
  })
}
// 删除重点项目汇报
export function deleteProjectReport(id) {
  return request({
    method: 'delete',
    url: `/api/projectReport/deleteProjectReport/${id}`,
  })
}
// 修改重点项目汇报
export function updateProjectReport(data) {
  return request({
    method: 'put',
    url: `/api/projectReport/updateProjectReport`,
    data
  })
}
// 重点项目汇报列表
export function selectProjectReport(data) {
  return request({
    method: 'get',
    url: `/api/projectReport/selectProjectReport`,
    params: data
  })
}
// 重点项目汇报详情
export function addReportDetail(data) {
  return request({
    method: 'post',
    url: `/api/reportDetails/addReportDetail`,
    data
  })
}
export function updateReportDetail(data) {
  return request({
    method: 'put',
    url: `/api/reportDetails/updateReportDetail`,
    data
  })
}
export function deleteReportDetail(id) {
  return request({
    method: 'delete',
    url: `/api/reportDetails/deleteReportDetail/${id}`,
  })
}
export function selectProjectReportDetails(id) {
  return request({
    method: 'get',
    url: `/api/reportDetails/selectProjectReportDetails/${id}`,
  })
}
// 用户管理查询
export function selectAcNameAndUserName(data) {
  return request({
    method: 'get',
    url: `/accountInfo/selectAcNameAndUserName`,
    params: data
  })
}
// 用户管理新增
export function addAccountInfo(data) {
  return request({
    method: 'post',
    url: `/accountInfo/addAccountInfo`,
    data
  })
}